using Google.ProtocolBuffers;
using Google.ProtocolBuffers.Collections;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class GetPackageListResponse : GeneratedMessageLite<GetPackageListResponse, GetPackageListResponse.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<GetPackageListResponse, GetPackageListResponse.Builder>
		{
			private bool resultIsReadOnly;
			private GetPackageListResponse result;
			protected override GetPackageListResponse.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override GetPackageListResponse MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override GetPackageListResponse DefaultInstanceForType
			{
				get
				{
					return GetPackageListResponse.DefaultInstance;
				}
			}
			public BaseResponse BaseResponse
			{
				get
				{
					return this.result.BaseResponse;
				}
				set
				{
					this.SetBaseResponse(value);
				}
			}
			public uint Count
			{
				get
				{
					return this.result.Count;
				}
				set
				{
					this.SetCount(value);
				}
			}
			public IPopsicleList<Package> ListList
			{
				get
				{
					return this.PrepareBuilder().list_;
				}
			}
			public int ListCount
			{
				get
				{
					return this.result.ListCount;
				}
			}
			public uint ContinueFlag
			{
				get
				{
					return this.result.ContinueFlag;
				}
				set
				{
					this.SetContinueFlag(value);
				}
			}
			public uint SvrCount
			{
				get
				{
					return this.result.SvrCount;
				}
				set
				{
					this.SetSvrCount(value);
				}
			}
			public uint Type
			{
				get
				{
					return this.result.Type;
				}
				set
				{
					this.SetType(value);
				}
			}
			public Builder()
			{
				this.result = GetPackageListResponse.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(GetPackageListResponse cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private GetPackageListResponse PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					GetPackageListResponse other = this.result;
					this.result = new GetPackageListResponse();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override GetPackageListResponse.Builder Clear()
			{
				this.result = GetPackageListResponse.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override GetPackageListResponse.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new GetPackageListResponse.Builder(this.result);
				}
				return new GetPackageListResponse.Builder().MergeFrom(this.result);
			}
			public override GetPackageListResponse BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override GetPackageListResponse.Builder MergeFrom(IMessageLite other)
			{
				if (other is GetPackageListResponse)
				{
					return this.MergeFrom((GetPackageListResponse)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override GetPackageListResponse.Builder MergeFrom(GetPackageListResponse other)
			{
				return this;
			}
			public override GetPackageListResponse.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override GetPackageListResponse.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(GetPackageListResponse._getPackageListResponseFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = GetPackageListResponse._getPackageListResponseFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 16u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseResponse.Builder builder = BaseResponse.CreateBuilder();
							if (this.result.hasBaseResponse)
							{
								builder.MergeFrom(this.BaseResponse);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseResponse = builder.BuildPartial();
							continue;
						}
						if (num3 == 16u)
						{
							this.result.hasCount = input.ReadUInt32(ref this.result.count_);
							continue;
						}
					}
					else
					{
						if (num3 <= 32u)
						{
							if (num3 == 26u)
							{
								input.ReadMessageArray<Package>(num, text, this.result.list_, Package.DefaultInstance, extensionRegistry);
								continue;
							}
							if (num3 == 32u)
							{
								this.result.hasContinueFlag = input.ReadUInt32(ref this.result.continueFlag_);
								continue;
							}
						}
						else
						{
							if (num3 == 40u)
							{
								this.result.hasSvrCount = input.ReadUInt32(ref this.result.svrCount_);
								continue;
							}
							if (num3 == 48u)
							{
								this.result.hasType = input.ReadUInt32(ref this.result.type_);
								continue;
							}
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public GetPackageListResponse.Builder SetBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = value;
				return this;
			}
			public GetPackageListResponse.Builder SetBaseResponse(BaseResponse.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = builderForValue.Build();
				return this;
			}
			public GetPackageListResponse.Builder MergeBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseResponse && this.result.baseResponse_ != BaseResponse.DefaultInstance)
				{
					this.result.baseResponse_ = BaseResponse.CreateBuilder(this.result.baseResponse_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseResponse_ = value;
				}
				this.result.hasBaseResponse = true;
				return this;
			}
			public GetPackageListResponse.Builder ClearBaseResponse()
			{
				this.PrepareBuilder();
				this.result.hasBaseResponse = false;
				this.result.baseResponse_ = null;
				return this;
			}
			public GetPackageListResponse.Builder SetCount(uint value)
			{
				this.PrepareBuilder();
				this.result.hasCount = true;
				this.result.count_ = value;
				return this;
			}
			public GetPackageListResponse.Builder ClearCount()
			{
				this.PrepareBuilder();
				this.result.hasCount = false;
				this.result.count_ = 0u;
				return this;
			}
			public Package GetList(int index)
			{
				return this.result.GetList(index);
			}
			public GetPackageListResponse.Builder SetList(int index, Package value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.list_[index] = value;
				return this;
			}
			public GetPackageListResponse.Builder SetList(int index, Package.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.list_[index] = builderForValue.Build();
				return this;
			}
			public GetPackageListResponse.Builder AddList(Package value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.list_.Add(value);
				return this;
			}
			public GetPackageListResponse.Builder AddList(Package.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.list_.Add(builderForValue.Build());
				return this;
			}
			public GetPackageListResponse.Builder AddRangeList(IEnumerable<Package> values)
			{
				this.PrepareBuilder();
				this.result.list_.Add(values);
				return this;
			}
			public GetPackageListResponse.Builder ClearList()
			{
				this.PrepareBuilder();
				this.result.list_.Clear();
				return this;
			}
			public GetPackageListResponse.Builder SetContinueFlag(uint value)
			{
				this.PrepareBuilder();
				this.result.hasContinueFlag = true;
				this.result.continueFlag_ = value;
				return this;
			}
			public GetPackageListResponse.Builder ClearContinueFlag()
			{
				this.PrepareBuilder();
				this.result.hasContinueFlag = false;
				this.result.continueFlag_ = 0u;
				return this;
			}
			public GetPackageListResponse.Builder SetSvrCount(uint value)
			{
				this.PrepareBuilder();
				this.result.hasSvrCount = true;
				this.result.svrCount_ = value;
				return this;
			}
			public GetPackageListResponse.Builder ClearSvrCount()
			{
				this.PrepareBuilder();
				this.result.hasSvrCount = false;
				this.result.svrCount_ = 0u;
				return this;
			}
			public GetPackageListResponse.Builder SetType(uint value)
			{
				this.PrepareBuilder();
				this.result.hasType = true;
				this.result.type_ = value;
				return this;
			}
			public GetPackageListResponse.Builder ClearType()
			{
				this.PrepareBuilder();
				this.result.hasType = false;
				this.result.type_ = 0u;
				return this;
			}
		}
		public const int BaseResponseFieldNumber = 1;
		public const int CountFieldNumber = 2;
		public const int ListFieldNumber = 3;
		public const int ContinueFlagFieldNumber = 4;
		public const int SvrCountFieldNumber = 5;
		public const int TypeFieldNumber = 6;
		private static readonly GetPackageListResponse defaultInstance;
		private static readonly string[] _getPackageListResponseFieldNames;
		private static readonly uint[] _getPackageListResponseFieldTags;
		private bool hasBaseResponse;
		private BaseResponse baseResponse_;
		private bool hasCount;
		private uint count_;
		private PopsicleList<Package> list_ = new PopsicleList<Package>();
		private bool hasContinueFlag;
		private uint continueFlag_;
		private bool hasSvrCount;
		private uint svrCount_;
		private bool hasType;
		private uint type_;
		private int memoizedSerializedSize = -1;
		public static GetPackageListResponse DefaultInstance
		{
			get
			{
				return GetPackageListResponse.defaultInstance;
			}
		}
		public override GetPackageListResponse DefaultInstanceForType
		{
			get
			{
				return GetPackageListResponse.DefaultInstance;
			}
		}
		protected override GetPackageListResponse ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseResponse BaseResponse
		{
			get
			{
				return this.baseResponse_ ?? BaseResponse.DefaultInstance;
			}
		}
		public uint Count
		{
			get
			{
				return this.count_;
			}
		}
		public IList<Package> ListList
		{
			get
			{
				return this.list_;
			}
		}
		public int ListCount
		{
			get
			{
				return this.list_.Count;
			}
		}
		public uint ContinueFlag
		{
			get
			{
				return this.continueFlag_;
			}
		}
		public uint SvrCount
		{
			get
			{
				return this.svrCount_;
			}
		}
		public uint Type
		{
			get
			{
				return this.type_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				if (!this.hasBaseResponse)
				{
					return false;
				}
				if (!this.hasCount)
				{
					return false;
				}
				if (!this.hasContinueFlag)
				{
					return false;
				}
				if (!this.hasSvrCount)
				{
					return false;
				}
				if (!this.BaseResponse.IsInitialized)
				{
					return false;
				}
				using (IEnumerator<Package> enumerator = this.ListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						Package current = enumerator.get_Current();
						if (!current.IsInitialized)
						{
							return false;
						}
					}
				}
				return true;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseResponse)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseResponse);
				}
				if (this.hasCount)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.Count);
				}
				using (IEnumerator<Package> enumerator = this.ListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						Package current = enumerator.get_Current();
						num += CodedOutputStream.ComputeMessageSize(3, current);
					}
				}
				if (this.hasContinueFlag)
				{
					num += CodedOutputStream.ComputeUInt32Size(4, this.ContinueFlag);
				}
				if (this.hasSvrCount)
				{
					num += CodedOutputStream.ComputeUInt32Size(5, this.SvrCount);
				}
				if (this.hasType)
				{
					num += CodedOutputStream.ComputeUInt32Size(6, this.Type);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private GetPackageListResponse()
		{
		}
		public Package GetList(int index)
		{
			return this.list_[index];
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] getPackageListResponseFieldNames = GetPackageListResponse._getPackageListResponseFieldNames;
			if (this.hasBaseResponse)
			{
				output.WriteMessage(1, getPackageListResponseFieldNames[0], this.BaseResponse);
			}
			if (this.hasCount)
			{
				output.WriteUInt32(2, getPackageListResponseFieldNames[2], this.Count);
			}
			if (this.list_.Count > 0)
			{
				output.WriteMessageArray<Package>(3, getPackageListResponseFieldNames[3], this.list_);
			}
			if (this.hasContinueFlag)
			{
				output.WriteUInt32(4, getPackageListResponseFieldNames[1], this.ContinueFlag);
			}
			if (this.hasSvrCount)
			{
				output.WriteUInt32(5, getPackageListResponseFieldNames[4], this.SvrCount);
			}
			if (this.hasType)
			{
				output.WriteUInt32(6, getPackageListResponseFieldNames[5], this.Type);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseResponse)
			{
				num ^= this.baseResponse_.GetHashCode();
			}
			if (this.hasCount)
			{
				num ^= this.count_.GetHashCode();
			}
			using (IEnumerator<Package> enumerator = this.list_.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					Package current = enumerator.get_Current();
					num ^= current.GetHashCode();
				}
			}
			if (this.hasContinueFlag)
			{
				num ^= this.continueFlag_.GetHashCode();
			}
			if (this.hasSvrCount)
			{
				num ^= this.svrCount_.GetHashCode();
			}
			if (this.hasType)
			{
				num ^= this.type_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			GetPackageListResponse getPackageListResponse = value as GetPackageListResponse;
			if (getPackageListResponse == null)
			{
				return false;
			}
			if (this.hasBaseResponse != getPackageListResponse.hasBaseResponse || (this.hasBaseResponse && !this.baseResponse_.Equals(getPackageListResponse.baseResponse_)))
			{
				return false;
			}
			if (this.hasCount != getPackageListResponse.hasCount || (this.hasCount && !this.count_.Equals(getPackageListResponse.count_)))
			{
				return false;
			}
			if (this.list_.Count != getPackageListResponse.list_.Count)
			{
				return false;
			}
			for (int i = 0; i < this.list_.Count; i++)
			{
				if (!this.list_[i].Equals(getPackageListResponse.list_[i]))
				{
					return false;
				}
			}
			return this.hasContinueFlag == getPackageListResponse.hasContinueFlag && (!this.hasContinueFlag || this.continueFlag_.Equals(getPackageListResponse.continueFlag_)) && (this.hasSvrCount == getPackageListResponse.hasSvrCount && (!this.hasSvrCount || this.svrCount_.Equals(getPackageListResponse.svrCount_))) && (this.hasType == getPackageListResponse.hasType && (!this.hasType || this.type_.Equals(getPackageListResponse.type_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<GetPackageListResponse, GetPackageListResponse.Builder>.PrintField("BaseResponse", this.hasBaseResponse, this.baseResponse_, writer);
			GeneratedMessageLite<GetPackageListResponse, GetPackageListResponse.Builder>.PrintField("Count", this.hasCount, this.count_, writer);
			GeneratedMessageLite<GetPackageListResponse, GetPackageListResponse.Builder>.PrintField<Package>("List", this.list_, writer);
			GeneratedMessageLite<GetPackageListResponse, GetPackageListResponse.Builder>.PrintField("ContinueFlag", this.hasContinueFlag, this.continueFlag_, writer);
			GeneratedMessageLite<GetPackageListResponse, GetPackageListResponse.Builder>.PrintField("SvrCount", this.hasSvrCount, this.svrCount_, writer);
			GeneratedMessageLite<GetPackageListResponse, GetPackageListResponse.Builder>.PrintField("Type", this.hasType, this.type_, writer);
		}
		public static GetPackageListResponse ParseFrom(byte[] data)
		{
			return GetPackageListResponse.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private GetPackageListResponse MakeReadOnly()
		{
			this.list_.MakeReadOnly();
			return this;
		}
		public static GetPackageListResponse.Builder CreateBuilder()
		{
			return new GetPackageListResponse.Builder();
		}
		public override GetPackageListResponse.Builder ToBuilder()
		{
			return GetPackageListResponse.CreateBuilder(this);
		}
		public override GetPackageListResponse.Builder CreateBuilderForType()
		{
			return new GetPackageListResponse.Builder();
		}
		public static GetPackageListResponse.Builder CreateBuilder(GetPackageListResponse prototype)
		{
			return new GetPackageListResponse.Builder(prototype);
		}
		static GetPackageListResponse()
		{
			GetPackageListResponse.defaultInstance = new GetPackageListResponse().MakeReadOnly();
			GetPackageListResponse._getPackageListResponseFieldNames = new string[]
			{
				"BaseResponse",
				"ContinueFlag",
				"Count",
				"List",
				"SvrCount",
				"Type"
			};
			GetPackageListResponse._getPackageListResponseFieldTags = new uint[]
			{
				10u,
				32u,
				16u,
				26u,
				40u,
				48u
			};
			object.ReferenceEquals(micromsg.Proto.GetPackageListResponse.Descriptor, null);
		}
	}
}
